package com.lening.community.controller;

import com.lening.common.base.BaseController;
import com.lening.common.web.Result;
import com.lening.community.dto.AreaDto;
import com.lening.community.pojo.Area;
import com.lening.community.service.AreaService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("area")
public class AreaController extends BaseController<Area, AreaDto,AreaService> {

    @Autowired
    private AreaService aService;

    @GetMapping("getAreaByPid")
    public Result<?> getAreaByPid(Integer pid){
        List<Area> aList = aService.getAreaByPid(pid);

        return Result.ok(aList);
    }
}
